package com.itheima.HomeWork;

import java.util.Scanner;

public class HM05 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s = sc.nextLine();
        int xzimucount =0;
        int dzimucount = 0;
        int numcount = 0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(c>='A'&&c<='Z'){
                xzimucount ++;
            }else if(c>='a'&&c<='z'){
                dzimucount ++;
            }else if(c>='0'&&c<='9'){
                numcount ++;
            }
        }
        System.out.println("英文字母有"+(xzimucount+dzimucount)+"个");
        System.out.println("数字字符有"+numcount+"个");
    }
}
